extends layout

block content
  h3 Deploy wast contract
  form
    .form-group
      label(for="value") Value (wei)
      input.form-control#value(type="text", placeholder="0", name="value")
      label(for="wastCode") Wast code
      textarea.form-control#wastCode(rows=10, name="wastCode", placeholder="(module)")
    button.btn.btn-primary.pull-right(onclick="submitTransaction()", type="button") Deploy
  if message
    p #{message}
  script.
    window.addEventListener('load', async () => {
      console.log('enabling ethereum...');
      await enableEthereum();
      validateChainId(!{JSON.stringify(data.chainId)}, !{JSON.stringify(data.rpcUrlSuggestion)});
    })
